/**
 * 新增-账户余额js
 */

$(function() {
	serch_user();
});

function serch_user(){
	$.ajax({
        type: 'post',
        url: '../../sys/tuser/userInfo',
        data: {
        	id : '28459001343934369441630647806',
        },
        async: false,
        success: function(data) {
        	var result = "";
        	result += "<option value='"+data.rows.id+"'>"+data.rows.contacts+"</option>";
        	$("#userId").append(result);
        }
	})
}


var vm = new Vue({
	el:'#dpLTE',
	data: {
		account: {
			active : 1,
		}
	},
	methods : {
		//厂名获取select选中值
		serch_user:function(){
			vm.account.userId = $('#userId option:selected').val();
		},
		acceptClick: function() {
			if (!$('#form').Validform()) {
		        return false;
		    }
		    $.SaveForm({
		    	url: '../../sys/account/save?_' + $.now(),
		    	param: vm.account,
		    	success: function(data) {
		    		$.currentIframe().vm.load();
		    	}
		    });
		}
	}
})
